package com.example.mapper;

import com.example.entity.Car;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Set;

/**
 * @Title: spring-boot-druid
 * @Package com.example.mapper
 * @Date 2018/5/8下午2:26
 * @Author PX ye
 * @E-mail yepx2013@gmail.com
 * @Company http://www.yiautos.com
 * @Description: ${todo}
 */
@Mapper
public interface CarMapper {

    /**
     * 根据用户id查询所有的车
     */
    @Select("SELECT * FROM `car` WHERE user_id = #{userId}")
    Set<Car> findCarByUserId(Long userId);
}
